package com.lzy.cloud.base;

import com.lzy.framework.core.utils.cryptors.AESCryptor;
import org.junit.Test;

/**
 * Description:
 * Author: ellengou
 * Version: 1.0
 * Create Date Time: 2017/8/11 0011.
 * Update Date Time:
 *
 * @see 'http://lzyhll.com'
 */
public class JDBCtest {

    @Test
    public void  test(){
        AESCryptor ase = AESCryptor.getInstance();
        //用私钥加密后的密文
//        url明文
        String url = "jdbc:mysql://192.168.88.203:3306/lzy_cloud_admin?useUnicode=true&useSSL=false&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull";
        System.out.println("url[ "+url+" ]的加密信息如下：\n");
        url = ase.encrypt( url);
        System.out.println("jdbc.url="+url);

        //密码明文
        String username = "root";
        //用户名明文
        String password = "123456";

        System.out.println("password[ "+password+" ]的加密信息如下：\n");
        password = ase.encrypt( password);
        System.out.println("jdbc.password="+password);


        System.out.println("username[ "+username+" ]的加密信息如下：\n");
        username = ase.encrypt( username);
        System.out.println("jdbc.username="+username);
    }
}
